package fr.cie.blog.domainservice;

import java.util.List;

import fr.cie.blog.beans.Article;
import fr.cie.blog.beans.Comment;
import fr.cie.blog.beans.User;
import fr.cie.blog.modeldao.hib.CommentDaoImplHib;

/**
 * @author AetM
 * 
 */
public class ServiceCommentDao implements IServiceComment {
	/**
	 * servCommentImpl.
	 */
	private final IServiceComment servCommentImpl = new CommentDaoImplHib();

	@Override
	public final int save(final Comment comment) {
		return servCommentImpl.save(comment);
	}

	@Override
	public final int delete(final Comment comment) {
		return servCommentImpl.delete(comment);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findAll()
	 */
	@Override
	public final List<Comment> findAll() {
		return servCommentImpl.findAll();
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * fr.cie.blog.domainservice.IServiceComment#findByArticle(fr.cie.blog.beans
	 * .Article)
	 */
	@Override
	public final List<Comment> findByArticle(final Article pArticle) {
		return servCommentImpl.findByArticle(pArticle);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see fr.cie.blog.domainservice.IServiceGeneric#findById(int)
	 */
	@Override
	public final Comment findById(final long pIdentifier) {
		return servCommentImpl.findById(pIdentifier);
	}

	/*
	 * (non-Javadoc)
	 * 
	 * @see
	 * fr.cie.blog.domainservice.IServiceComment#findByUser(fr.cie.blog.beans
	 * .User)
	 */
	@Override
	public final List<Comment> findByUser(final User pUser) {
		return servCommentImpl.findByUser(pUser);
	}

	@Override
	public final int update(final Comment comment) {
		return servCommentImpl.update(comment);
	}

}